import { MockMethod, Recordable } from 'vite-plugin-mock';

interface response {
  body: Recordable;
  query: Recordable;
}


export default [
  {
    url: '/api/getAttendanceTimesAjax',
    method: 'post',
    response: ({ body }: response) => {
      console.log('body>>>>>>>>', body);
      // console.log('query>>>>>>>>', query);
      return {
        code: 200,
        message: 'ok',
        data: { mockData },
      };
    },
  },
] as MockMethod[];

const mockData = {
  times: [
    {
      id: "21733",
      time: "2023-09-27 09:50:30"
    },
    {
      id: "21780",
      time: "2023-10-04 18:04:24"
    },
    {
      id: "21781",
      time: "2023-10-04 18:24:04"
    },
    {
      id: "21951",
      time: "2023-10-16 16:42:29"
    },
    {
      id: "22458",
      time: "2023-11-19 15:06:11"
    },
  ],
  studentAttendance:[
    {
      stuID: "202111372",
      number: "172150612",
      name: "毛淑媛",
      sex: "2",
      team: "0",
      rec: [
        0,
        0,
        0,
        1,
        1
      ]
    },
    {
      stuID: "202111289",
      number: "172150613",
      name: "王莹莹",
      sex: "2",
      team: "0",
      rec: [
        0,
        2,
        0,
        0,
        2,
      ]
    },
    {
      stuID: "202014025",
      number: "172040216",
      name: "李冠华",
      sex: "1",
      team: "0",
      rec: [
        0,
        0,
        0,
        0,
        0,

      ]
    },
    {
      "stuID": 202012210,
      "number": "172050927",
      "name": "柯常杰",
      "sex": "1",
      "team": 0,
      "rec": [
        0,
        0,
        0,
        0,
        100
      ]
    },
    {
      stuID: "202012246",
      number: "172050932",
      name: "赵鹏程",
      "sex": "1",
      team: "0",
      "rec": [
        0,
        0,
        0,
        0,
        0,
      ]
    },
  ],
};
